WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
check_log.h
Go to the documentation of this file.
1// WOLF - Copyright (C) 2020-2026
2// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
3// Authors: Joan Solà Ortega (jsola@iri.upc.edu) and
4// Joan Vallvé Navarro (jvallve@iri.upc.edu)
5// All rights reserved.
6//
7// This file is part of WOLF: http://www.iri.upc.edu/wolf
8// WOLF is free software: you can redistribute it and/or modify
9// it under the terms of the GNU General Public License version 3
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19#pragma once
20
21#include <iostream>
22#include <string>
23#include <sstream>
24
25namespace wolf
26{
30{
31 public:
33 std::string explanation_;
34
37 CheckLog();
38
41 CheckLog(bool _consistent, std::string _explanation);
42
46
49 void compose(CheckLog l);
50
53 void assertTrue(bool _condition, std::stringstream& _stream);
54};
55
56} // namespace wolf
Log of a consistency check: whether it is consistent and the explanation of the inconsistencies.
Definition: check_log.h:30
void assertTrue(bool _condition, std::stringstream &_stream)
Composes a condition, with the stream contents as explanation if false, and clears the stream.
Definition: check_log.cpp:41
bool is_consistent_
Whether the check passed.
Definition: check_log.h:32
void compose(CheckLog l)
Composes another log: consistent if both are, with both explanations.
Definition: check_log.cpp:36
std::string explanation_
Explanation of the inconsistencies.
Definition: check_log.h:33
~CheckLog()
Destructor.
Definition: check_log.h:45
CheckLog()
Default constructor: consistent, without explanation.
Definition: check_log.cpp:23
Definition: capture_base.h:23